<template>
  <div class="app">
    <transition name="fade" mode="out-in">
      <router-view/>
    </transition>
    <van-tabbar route v-model="active">
        <van-tabbar-item icon="home-o" to="/index/home">首页</van-tabbar-item>
        <van-tabbar-item icon="gift-o" to="/index/tuan">爆爆团</van-tabbar-item>
        <van-tabbar-item icon="orders-o" to="/index/order">订单</van-tabbar-item>
        <van-tabbar-item icon="https://b.yzcdn.cn/vant/icon-demo-1126.png" to="/index/mine">我的</van-tabbar-item>
    </van-tabbar>
      

  </div>
</template>

<script>
export default {
    data() {
    return {
      active: 0,
    };
  },
}
</script>

<style scoped>
.fade-enter{
    opacity: 0;
  }
.fade-enter-active{
    transition: all 0.5s;
}
.fade-enter-to{
    opacity: 1;
}
/* 离场动画 */
.fade-leave{
  opacity: 1;
}
.fade-leave-active{
  transition: all 0.2s;
}
.fade-leave-to{
    opacity: 0;
}
</style>